package gray.android.frame;


import gray.Frame;
import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;

public class RawFrame extends LinearLayout implements Frame<View>{
	final Frame<View>[] _lst;
	
	public RawFrame(final Context context, final Frame<View>[] lst) {
		super(context);
		setOrientation(LinearLayout.VERTICAL);	
		_lst = lst;
		for (int i=0;i<lst.length;i++)
			addView(lst[i].container());
	}
	
	public static Frame<View> factory(final Context context,final Frame<View>[] lst){
		return new RawFrame(context,lst);
	}

	@Override
	public View container() {
		return this;
	}

	@Override
	public Boolean ready() {
		//for (Frame<View> f : _lst)
		for (int i=0;i<_lst.length;i++)
			if (_lst[i].ready())
				return true;
		return false;
	}

}
